/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cardgame.game.monsters;

import cardgame.game.*;
import cardgame.game.events.*;

/**
 *
 * @author Carl
 */
public class AngelOfMercy extends MonsterCard{

    public AngelOfMercy(){
        description = new Description("Angel of Mercy", "When this monster is summoned, restore 3 health of its owner.");
        manaTypes = new Mana[]{Mana.WHITE};
        summonCost = new Cost(new ManaAmount(Mana.WHITE, 3), 0, false);
        attackDamage = 3;
        setLifepoints(3);
    }

    @Override
    public void postEvent(Game game, Event receivedEvent){
        super.postEvent(game, receivedEvent);
        if(receivedEvent instanceof SummonMonsterEvent){
            SummonMonsterEvent event = (SummonMonsterEvent) receivedEvent;
            if(event.getMonsterCard() == this){
                game.triggerEvent(new AddPlayerLifepointsEvent(owner, 3));
            }
        }
    }
}
